package ua.com.infinite.mobile;

import org.json.JSONObject;

import ua.com.infinite.mobile.plains.User;
import android.app.Application;
import android.content.Context;

public class App extends Application {

	public static Context context;
	public static User user = null;

	@Override
	public void onCreate() {
		super.onCreate();
	}

	public static void setContext(Context context) {
		App.context = context;
		user = User.getInstance(context);
	}
	
	public static User getUser(){
		return user = User.getInstance(context);
	}

	public static void logOff(Context context) {
		user.logOff(context);
		user = null;
	}

	public static void logIn(Context context, JSONObject object) {
		user.logIn(context, object);
	}
}
